import {Fragment} from 'react'
import { createRoot } from 'react-dom/client'
import '@ant-design/v5-patch-for-react-19';
import './index.css'
import App from './App.tsx'
import {ConfigProvider, theme} from 'antd';
import locale from 'antd/locale/zh_CN';
import 'dayjs/locale/zh-cn';
import {App as AntdMessageContext} from "antd";
import {Provider} from "react-redux";
import {store} from "@/redux/store.ts";

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
createRoot(document.getElementById('root')!).render(
  <Fragment>
      <Provider store={store}>
          <ConfigProvider
              locale={locale}
              theme={{
                  algorithm: [theme.darkAlgorithm],
                  token: {
                      colorBgLayout: "",
                      colorBgContainer: "rgba(20,20,20,0.94)"
                      // colorBgBase: "#04080b"
                  }
              }}
          >
              <AntdMessageContext>
                  <App/>
              </AntdMessageContext>
          </ConfigProvider>
      </Provider>
  </Fragment>,
)
